const http = require("http");

const server = http.createServer();

server.on("request", (req, res) => {
    const nowUrl = req.url;
    switch (nowUrl) {
        case "/":
            res.write("index");
            break;
        case "/login":
            res.write("login");
            break;
        case "/register":
            res.write("register");
            break;
        default:
            res.write("other")
    }
    res.end()
});

server.listen(2500, function () {
    console.log("this server running at http://127.0.0.1:2500")
});
